// pages/cardinfo/cardinfo.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    cardinfo: [
      { name: '卡号', des: 'cq1232456789' },
      { name: '姓名', des: '韩梅梅' },
      { name: '电话', des: '15123456789' },
      { name: '证件号码', des: '50012345674855845532' },
      { name: '充值金额', des: '200元' },
      { name: '地址', des: '重庆市渝北区中溉路国宾城园区' },
      { name: '押金', des: '0' },
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;

    if (options.info != undefined) {
      var data = JSON.parse(options.info)
      console.info(data);
      that.setData({
        'cardinfo[0].des': data.card_number,
        'cardinfo[1].des': data.full_name,
        'cardinfo[2].des': data.tel,
        'cardinfo[3].des': data.IDcard,
        'cardinfo[4].des': data.price+'元',
        'cardinfo[5].des': data.address,
        'cardinfo[6].des': data.deposit_s,
      });
    }
  },


  // 完成
  complete: function () {
    /*
    wx.showToast({
      title: '开卡成功',
      icon: 'none',
      duration: 2000
    })
    */

    wx.navigateTo({
      url: '../fillin_info/fillin_info'
    })

  }
  
})